package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.example.demo.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2023-09-15
 */
public interface UserMapper extends BaseMapper<User> {


    /**
     * where name like "%o%" AND balance >= 1000
     * @param wrapper
     * @return
     */
    @Select("select u.* from user u ${ew.customSqlSegment}")
    List<User> selectList2( @Param(Constants.WRAPPER) QueryWrapper<User> wrapper);



}
